package com.ruoyi.web.controller.system;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.UserPie;
import com.ruoyi.system.service.IUserPieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * 数据录入Controller
 *
 * @author YuHaoxiang
 * @date 2022-10-15
 */
//Controller
@RestController
@RequestMapping("/dashboard/piechart")
public class UserPieController extends BaseController {

    @Autowired
    private IUserPieService userPieService;

    @ResponseBody
    @PreAuthorize("@ss.hasPermi('dashboard:barchart:listPie')")
    @GetMapping("listPie")
    public TableDataInfo listPie(UserPie userPie){
        List<UserPie> listPie = userPieService.selectSysMapBarList(userPie);
        return getDataTable(listPie);
    }


}
